 | Trinux The Basics |
First Steps
The first thing use should realize is that Trinux is Linux which means that if you've never used it before, there might be a bit of a learning curve. Even in the X Windows version of Trinux, most (if not all) programs and utilities are run from the command-line. No mouse, no pop-up menus, dialog boxes, etc. Here are some commands and features of the console (meaning the non-windowing environment of Trinux). It might be worth your while to find an old book on UNIX or Linux. Any of the O'Reilly books (the ones with the animals) are generally a good choice.
- Moving around - the ls command gives you a listing of the files in your current directory. To find current working directory, enter pwd. To change directory enter cd directory. cd / takes to to the root directory. To list all the binaries (programs) that were loaded on your system, type ls /bin /usr/bin. Within the /bin directory you should see the standard unix commands (such as ls. Within /usr/bin should will probably see bash, less, wget, tcpdump, depending on which packages you chose to load.
- the UNIX shell - the shell is the program that allows you to execute other programs (binaries) and interpret shell scripts that accomplish most of the magic that is Trinux. Unless you install the bash.tgz package, your default shell is ash which provides a minimal set of features. Bash allows you to edit previous lines via the up arrow key and is the preferred shell for most Linux users. If your cursor keys generate funny characters with lots of left square brackets, ash is installed. Most user's will want to install bash.
- virtual consoles - Linux allows you to use multiple terminal sessionsso that you can have multiple sessions running at once--kind of like having multiple command prompts open in Windows 95/98. You can cycle between these virtual terminal sessions with the ALT-Left/Right cursor keys. The splitvt command allows you to divide your console in two. Control-W allows you to move between two windows.
- getting help - As in UNIX, there are manual pages for some of the common tools used by Trinux. If you type man and RETURN, you will see a listing of the manual pages that are installed. The general syntax is man command such as man nmap to see the documentation for Fyodor's port scanning tool.
Directory Structure
When you first enter trinux and do an ls you will see the following:
bin dev floppy linuxrc sbin usr
boot etc home mnt tmp var
cdrom fixed lib proc tux
So what is in each of these directories?
- bin - the standard unix utilies, most of which are part of busybox
- sbin - more unix utilies and many of the Trinux administration scripts (fmount, fumount, getpkg, gethome, savecfg, etc.)
- dev - device files the OS uses to access terminals, ramdisks, and various types of fixed and removable media
- etc - the standard location for Linux configuration files
- tux - the location of Trinux configuration files that were copied from the boot floppy during startup. This is actually a link (like a windows shortcut or Mac alias) to /etc/tux
Using Floppies
Since you may occasionally need to modify the boot floppy, it is important to know how to mount a DOS formatted floppy (all the trinux disk images are DOS floppies). Trinux (like all Unix systems) requires you to mount the filesystem at a specific location within your directory tree. You could use mount -t vfat /dev/fd0 /floppy command or simply fmount to mount an MS-DOS floppy. Before removing the floppy you must unmount it with either the fumount command or umount /floppy. Warning: You will not be able to unmout the floppy if any of your consoles are accessing files within /floppy. It usually a good idea to cd / before unmounting any filesystem.
Saving your Files/Data
Starting with version 0.71, a /home directory (actually a partition)
is available for saving any scripts or data for backup or future Trinux sessions. The savehome command tars up /home and uses ssh or ftp to copy it to a remote server, while gethome retrieves a previously saved file from a remote server and uncompresses it. By default the filename is home.tgz, although you may specify a filename to use (minus the .tgz extension after the command.) The commands use the /etc/tux/config/home (/tux/config/home on the floppy) to specify the transfer protocol (ssh/ftp) hostname/ip address and username on that server. See /etc/tux/config/readme for more information.
Saving your configuration
The /tux directory on the